include_directories(${CMAKE_CURRENT_SOURCE_DIR})

set( SIZEOF_VOID_P ${CMAKE_SIZEOF_VOID_P} )

configure_file(iBase_f.h.in "${CMAKE_CURRENT_BINARY_DIR}/iBase_f.h" @ONLY)

set( BASE_INCLUDE_HEADERS iBase.h ${CMAKE_CURRENT_BINARY_DIR}/iBase_f.h)

if (MOAB_HAVE_CGM)
  set(MOAB_HAVE_IGEOM ON PARENT_SCOPE)
endif(MOAB_HAVE_CGM)

if(ENABLE_IMESH )
  add_subdirectory(imesh)
  set(MOAB_HAVE_IMESH ON PARENT_SCOPE)
endif()

if(ENABLE_FBIGEOM )
  add_subdirectory(fbigeom)
  set(MOAB_HAVE_FBIGEOM ON PARENT_SCOPE)
endif()

if(ENABLE_IREL AND MOAB_HAVE_CGM )
  add_subdirectory(irel)
  set(MOAB_HAVE_IREL ON PARENT_SCOPE)
endif()

if (ENABLE_MESQUITE AND MOAB_HAVE_CGM)
  #add_subdirectory(mesquite)
  #set(MOAB_HAVE_MESQUITE ON PARENT_SCOPE)
endif(ENABLE_MESQUITE AND MOAB_HAVE_CGM)

install(
  FILES ${BASE_INCLUDE_HEADERS}
  DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
  )
